#!/bin/bash

test_dir="test/stcu/tests"

if [ $# -lt 1 ]; then
    echo "Usage: $0 CLASS_NAME"
    echo
    echo "Test classes: "
    pushd $test_dir > /dev/null
    for f in *; do echo $f | sed 's/.java//'; done
    popd $test_dir > /dev/null
    echo
    exit
fi

ant compile-tests && java -cp 'build/prod:build/test:lib/*' org.junit.runner.JUnitCore stcu.tests.$1
